cc.Class({
    extends: cc.Component,

    properties: {
        ipSvr: cc.EditBox,
        ipChannel: cc.EditBox,
        ipName: cc.EditBox,
        userName: null,
        channel: null,
        gateSvrIP: null,
        gateSvrPort: null,
        logicSvrIP: null,
        logicSvrPort: null,
    },

    onLoad: function () {
        window.ui_login = this;
    },

    onClickSignup: function () {
        uiMgr.close("ui_login");
        uiMgr.open("ui_register");
    },

    onClickSignin: function () {
        this.userName = this.ipName.string;
        this.channel = this.ipChannel.string;
        var svrStr = this.ipSvr.string;
        if (svrStr == null || svrStr.length == 0) {
            cc.log("svr is nil");
            return;
        }
        var strs = svrStr.split(":");
        this.gateSvrIP = strs[0];
        this.gateSvrPort = strs[1];

        var that = this;
    }
});
